xdg-trashdir
Get the correct trash path on Linux according to the spec
Install
$ npm install xdg-trashdir
Usage
const xdgTrashdir = require('xdg-trashdir');
xdgTrashdir().then(dir => {
console.log(dir);
});
xdgTrashdir('foo.zip').then(dir => {
console.log(dir);
});
xdgTrashdir.all().then(dirs => {
console.log(dirs);
});
API
xdgTrashdir([file])
Returns a Promise
that resolves the path to the trash.
file
Type: string
Get the trash path for a specific file.
xdgTrashdir.all()
Returns a Promise
that resolves to an array with all possible trash paths.
License
MIT © Kevin Mårtensson